import request from '@/utils/request'

export function getGroupList (params:any) {
    return request({
        url: 'mate.filesGroup/list',
        method: 'GET',
        params
    })
}
export function createGroup (data:any) {
    return request({
        url: `mate.filesGroup/create`,
        method: 'POST',
        data
    })
}
export function updateGroup (data:any) {
    return request({
        url: `mate.filesGroup/update`,
        method: 'PUT',
        data
    })
}

export function delGroup (data:{group_id:number|string}) {
    return request({
        url: `mate.filesGroup/delete`,
        method: 'DELETE',
        data
    })
}

export function getList (params:any) {
    return request({
        url: 'mate.files/list',
        method: 'GET',
        params
    })
}

export function delFiles (data:{ids:number|string}) {
    return request({
        url: `mate.files/delete`,
        method: 'DELETE',
        data
    })
}

export function setFilesGroup (data:{ids:number|string,group_id:number|string}) {
    return request({
        url: `mate.files/setGroup`,
        method: 'PUT',
        data
    })
}


export function updateFileName (data:any) {
    return request({
        url: `mate.files/updateName`,
        method: 'PUT',
        data
    })
}